home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news3.noc.netcom.net!zdc!zippo!usenet
- From: Jim McFarland <jgm6@orkand.em.cdc.gov>
- Subject: Re: Executing DOS command from C
- Content-Type: text/plain; charset=us-ascii
- Sender: usenet@news.zippo.com
- Content-Transfer-Encoding: 7bit
- Nntp-Posting-Host: 158.111.166.77
- Organization: The Orkand Corporation
- Message-ID: <DL2zMr.AA6@news.zippo.com>
- References: <4d28di$b7g@globe.indirect.com>
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
- Mime-Version: 1.0
- Date: Fri, 12 Jan 1996 18:35:14 GMT
-
- wayneft@indirect.com wrote:
- >I know that this is probably a stupid question, but it's been a while
- >since I have programmed in C. My question is what is the command in a
- >C program that executes a DOS command such as DIR, or COPY. I've
- >looked through all my books and for some reason I just can't seem to
- >find it. I know it is a real simple command that is in the dos.h
- >header file. If someone could email me or post the command I would be
- >very grateful, I need it because I have to something for work.
- >
- >wayneft@indirect.com
- >
- >
-
- Try using the function system(), e.g.:
-
- system( "dir" );
-
- Jim
-
-
-